﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Krile.Common
{
    /// <summary>
    /// Frequently-used regexs
    /// </summary>
    static public class Regexs
    {
        /// <summary>
        /// At-mark(@) regex
        /// </summary>
        /// <remarks>
        /// It use in Twitter or many other microbrog services.
        /// generally, "@user_id" means to reply for user_id.
        /// </remarks>
        public static Regex AtRegex = new Regex(@"@([A-Za-z0-9_]*)", RegexOptions.Singleline | RegexOptions.Compiled);

        /// <summary>
        /// Url-Regex
        /// </summary>
        public static Regex URLRegex = new Regex(@"((?:http|https)\:[\w\;\/\?\:\@\&\=\+\$\,\-_\.\!\~\*\'\(\)\%#]+)", RegexOptions.Singleline | RegexOptions.Compiled);
    }
}
